package com.wdj.creation.prototype.pattern.entity;

import jdk.nashorn.internal.runtime.PrototypeObject;

/**
 * @ClassName ConcretePrototype
 * @Description
 * @Author wdj
 * @Date 2020/12/14 21:34
 * @Version 1.0
 **/
public class ConcretePrototype implements Cloneable{
    //调用clone()一定要实现Cloneable，否则会抛出CloneNotSupportedException异常
    public ConcretePrototype() {
        try {
            Object object = super.clone();
        } catch (CloneNotSupportedException e) {
            System.out.println("异常");
        }
    }
}
